#ifndef _UNIVERSAL_H_
#define _UNIVERSAL_H_
#include "stdint.h"

void get_compile_datetime(char * compile_date, char * strtime);

unsigned int calc_file_sum(unsigned char * data, int len);


static inline void uint2ip(uint32_t ip, uint8_t*pdst)
{
    uint8_t* p0 = pdst+0;
    uint8_t* p1 = pdst+1;
    uint8_t* p2 = pdst+2;
    uint8_t* p3 = pdst+3;
    
    *p0 = ip & 0xFF;
    *p1 = (ip>>8) & 0xFF;
    *p2 = (ip>>16) & 0xFF;
    *p3 = (ip>>24) & 0xFF;    
}
void get_chip_serial_num(uint32_t*cpuid);
void SoftReset(void);
#endif
